home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / PowerFantasm™ 4.19a / Beginners guide / PPC Examples / PPC_Ex_1.s next >
Text File  |  1997-02-09  |  537b  |  14 lines

  1.     includeh    ls_ppc_macros.def    *the macros we need
  2.     includeh    general_usage.def    *some handy definitions
  3. **Beginners guide to PowerPC assembly language.
  4. **Example 1
  5. **(C) Lightsoft 1996.
  6. **Program to add two numbers.
  7.     start_up        *the start_up macro as detailed above - sets up the toc etc
  8.     Xcall    Debugger    *call Macsbug so we can see it happen.
  9.     li    r3,4        *First number is 4.
  10.     li    r4,8        *8 is second number
  11.     add    r5,r4,r3    *add r3 to r4 and store result in r5
  12.     tidy_up            *clear up processors registers and get ready to exit
  13.     blr            *back to system.
  14.